/*
* Copyright 2025 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_screen(lv_ui *ui)
{
    //Write codes screen
    ui->screen = lv_obj_create(NULL);
    lv_obj_set_size(ui->screen, 800, 480);
    lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);

    //Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_bg_opa(ui->screen, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes screen_label_Tittle
    ui->screen_label_Tittle = lv_label_create(ui->screen);
    lv_label_set_text(ui->screen_label_Tittle, "喷漆控制器");
    lv_label_set_long_mode(ui->screen_label_Tittle, LV_LABEL_LONG_WRAP);
    lv_obj_set_pos(ui->screen_label_Tittle, 156, 17);
    lv_obj_set_size(ui->screen_label_Tittle, 436, 48);

    //Write style for screen_label_Tittle, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_border_width(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->screen_label_Tittle, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_label_Tittle, &lv_font_Type_37, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_label_Tittle, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_letter_space(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_line_space(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->screen_label_Tittle, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_label_Tittle, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes screen_btn_Start
    ui->screen_btn_Start = lv_btn_create(ui->screen);
    ui->screen_btn_Start_label = lv_label_create(ui->screen_btn_Start);
    lv_label_set_text(ui->screen_btn_Start_label, "开始");
    lv_label_set_long_mode(ui->screen_btn_Start_label, LV_LABEL_LONG_WRAP);
    lv_obj_align(ui->screen_btn_Start_label, LV_ALIGN_CENTER, 0, 0);
    lv_obj_set_style_pad_all(ui->screen_btn_Start, 0, LV_STATE_DEFAULT);
    lv_obj_set_width(ui->screen_btn_Start_label, LV_PCT(100));
    lv_obj_set_pos(ui->screen_btn_Start, 575, 74);
    lv_obj_set_size(ui->screen_btn_Start, 187, 150);

    //Write style for screen_btn_Start, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_bg_opa(ui->screen_btn_Start, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->screen_btn_Start, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->screen_btn_Start, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui->screen_btn_Start, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_btn_Start, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_btn_Start, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->screen_btn_Start, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_btn_Start, &lv_font_Type_31, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_btn_Start, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->screen_btn_Start, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes screen_btn_Reset
    ui->screen_btn_Reset = lv_btn_create(ui->screen);
    ui->screen_btn_Reset_label = lv_label_create(ui->screen_btn_Reset);
    lv_label_set_text(ui->screen_btn_Reset_label, "复位");
    lv_label_set_long_mode(ui->screen_btn_Reset_label, LV_LABEL_LONG_WRAP);
    lv_obj_align(ui->screen_btn_Reset_label, LV_ALIGN_CENTER, 0, 0);
    lv_obj_set_style_pad_all(ui->screen_btn_Reset, 0, LV_STATE_DEFAULT);
    lv_obj_set_width(ui->screen_btn_Reset_label, LV_PCT(100));
    lv_obj_set_pos(ui->screen_btn_Reset, 575, 273);
    lv_obj_set_size(ui->screen_btn_Reset, 192, 159);

    //Write style for screen_btn_Reset, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_bg_opa(ui->screen_btn_Reset, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->screen_btn_Reset, lv_color_hex(0xff6a2f), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->screen_btn_Reset, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui->screen_btn_Reset, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_btn_Reset, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_btn_Reset, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->screen_btn_Reset, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_btn_Reset, &lv_font_Type_31, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_btn_Reset, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->screen_btn_Reset, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes screen_ddlist_Speed
    ui->screen_ddlist_Speed = lv_dropdown_create(ui->screen);
    lv_dropdown_set_options(ui->screen_ddlist_Speed, "3CM\n5CM\n7CM");
    lv_obj_set_pos(ui->screen_ddlist_Speed, 58, 127);
    lv_obj_set_size(ui->screen_ddlist_Speed, 240, 67);

    //Write style for screen_ddlist_Speed, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_text_color(ui->screen_ddlist_Speed, lv_color_hex(0x0D3055), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_ddlist_Speed, &lv_font_Type_34, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_ddlist_Speed, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui->screen_ddlist_Speed, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui->screen_ddlist_Speed, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui->screen_ddlist_Speed, lv_color_hex(0xe1e6ee), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_side(ui->screen_ddlist_Speed, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->screen_ddlist_Speed, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->screen_ddlist_Speed, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->screen_ddlist_Speed, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_ddlist_Speed, 3, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->screen_ddlist_Speed, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->screen_ddlist_Speed, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->screen_ddlist_Speed, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_ddlist_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_CHECKED for &style_screen_ddlist_Speed_extra_list_selected_checked
    static lv_style_t style_screen_ddlist_Speed_extra_list_selected_checked;
    ui_init_style(&style_screen_ddlist_Speed_extra_list_selected_checked);

    lv_style_set_border_width(&style_screen_ddlist_Speed_extra_list_selected_checked, 1);
    lv_style_set_border_opa(&style_screen_ddlist_Speed_extra_list_selected_checked, 255);
    lv_style_set_border_color(&style_screen_ddlist_Speed_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_screen_ddlist_Speed_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_screen_ddlist_Speed_extra_list_selected_checked, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Speed_extra_list_selected_checked, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Speed_extra_list_selected_checked, lv_color_hex(0x00a1b5));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Speed_extra_list_selected_checked, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Speed), &style_screen_ddlist_Speed_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);

    //Write style state: LV_STATE_DEFAULT for &style_screen_ddlist_Speed_extra_list_main_default
    static lv_style_t style_screen_ddlist_Speed_extra_list_main_default;
    ui_init_style(&style_screen_ddlist_Speed_extra_list_main_default);

    lv_style_set_max_height(&style_screen_ddlist_Speed_extra_list_main_default, 120);
    lv_style_set_text_color(&style_screen_ddlist_Speed_extra_list_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_screen_ddlist_Speed_extra_list_main_default, &my_front_30);
    lv_style_set_text_opa(&style_screen_ddlist_Speed_extra_list_main_default, 255);
    lv_style_set_border_width(&style_screen_ddlist_Speed_extra_list_main_default, 1);
    lv_style_set_border_opa(&style_screen_ddlist_Speed_extra_list_main_default, 255);
    lv_style_set_border_color(&style_screen_ddlist_Speed_extra_list_main_default, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_screen_ddlist_Speed_extra_list_main_default, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_screen_ddlist_Speed_extra_list_main_default, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Speed_extra_list_main_default, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Speed_extra_list_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Speed_extra_list_main_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Speed), &style_screen_ddlist_Speed_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_screen_ddlist_Speed_extra_list_scrollbar_default
    static lv_style_t style_screen_ddlist_Speed_extra_list_scrollbar_default;
    ui_init_style(&style_screen_ddlist_Speed_extra_list_scrollbar_default);

    lv_style_set_radius(&style_screen_ddlist_Speed_extra_list_scrollbar_default, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Speed_extra_list_scrollbar_default, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Speed_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Speed_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Speed), &style_screen_ddlist_Speed_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

    //Write codes screen_ddlist_Mode
    ui->screen_ddlist_Mode = lv_dropdown_create(ui->screen);
    lv_dropdown_set_options(ui->screen_ddlist_Mode, "30*30\n50*50\n70*70");
    lv_obj_set_pos(ui->screen_ddlist_Mode, 58, 297);
    lv_obj_set_size(ui->screen_ddlist_Mode, 240, 67);

    //Write style for screen_ddlist_Mode, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_text_color(ui->screen_ddlist_Mode, lv_color_hex(0x0D3055), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_ddlist_Mode, &lv_font_Type_34, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_ddlist_Mode, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui->screen_ddlist_Mode, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui->screen_ddlist_Mode, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui->screen_ddlist_Mode, lv_color_hex(0xe1e6ee), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_side(ui->screen_ddlist_Mode, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->screen_ddlist_Mode, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->screen_ddlist_Mode, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->screen_ddlist_Mode, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_ddlist_Mode, 3, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->screen_ddlist_Mode, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->screen_ddlist_Mode, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->screen_ddlist_Mode, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_ddlist_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_CHECKED for &style_screen_ddlist_Mode_extra_list_selected_checked
    static lv_style_t style_screen_ddlist_Mode_extra_list_selected_checked;
    ui_init_style(&style_screen_ddlist_Mode_extra_list_selected_checked);

    lv_style_set_border_width(&style_screen_ddlist_Mode_extra_list_selected_checked, 1);
    lv_style_set_border_opa(&style_screen_ddlist_Mode_extra_list_selected_checked, 255);
    lv_style_set_border_color(&style_screen_ddlist_Mode_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_screen_ddlist_Mode_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_screen_ddlist_Mode_extra_list_selected_checked, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Mode_extra_list_selected_checked, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Mode_extra_list_selected_checked, lv_color_hex(0x00a1b5));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Mode_extra_list_selected_checked, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Mode), &style_screen_ddlist_Mode_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);

    //Write style state: LV_STATE_DEFAULT for &style_screen_ddlist_Mode_extra_list_main_default
    static lv_style_t style_screen_ddlist_Mode_extra_list_main_default;
    ui_init_style(&style_screen_ddlist_Mode_extra_list_main_default);

    lv_style_set_max_height(&style_screen_ddlist_Mode_extra_list_main_default, 120);
    lv_style_set_text_color(&style_screen_ddlist_Mode_extra_list_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_screen_ddlist_Mode_extra_list_main_default, &my_front_30);
    lv_style_set_text_opa(&style_screen_ddlist_Mode_extra_list_main_default, 255);
    lv_style_set_border_width(&style_screen_ddlist_Mode_extra_list_main_default, 1);
    lv_style_set_border_opa(&style_screen_ddlist_Mode_extra_list_main_default, 255);
    lv_style_set_border_color(&style_screen_ddlist_Mode_extra_list_main_default, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_screen_ddlist_Mode_extra_list_main_default, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_screen_ddlist_Mode_extra_list_main_default, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Mode_extra_list_main_default, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Mode_extra_list_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Mode_extra_list_main_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Mode), &style_screen_ddlist_Mode_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_screen_ddlist_Mode_extra_list_scrollbar_default
    static lv_style_t style_screen_ddlist_Mode_extra_list_scrollbar_default;
    ui_init_style(&style_screen_ddlist_Mode_extra_list_scrollbar_default);

    lv_style_set_radius(&style_screen_ddlist_Mode_extra_list_scrollbar_default, 3);
    lv_style_set_bg_opa(&style_screen_ddlist_Mode_extra_list_scrollbar_default, 255);
    lv_style_set_bg_color(&style_screen_ddlist_Mode_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
    lv_style_set_bg_grad_dir(&style_screen_ddlist_Mode_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(lv_dropdown_get_list(ui->screen_ddlist_Mode), &style_screen_ddlist_Mode_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

    //Write codes screen_label_Speed
    ui->screen_label_Speed = lv_label_create(ui->screen);
    lv_label_set_text(ui->screen_label_Speed, "抬升高度");
    //lv_style_set_text_font(&my_front, &lv_font_montserrat_28);  /* 设置更大的字体 */
    lv_label_set_long_mode(ui->screen_label_Speed, LV_LABEL_LONG_WRAP);
    lv_obj_set_pos(ui->screen_label_Speed, 12, 77);
    lv_obj_set_size(ui->screen_label_Speed, 150, 37);

    //Write style for screen_label_Speed, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_border_width(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->screen_label_Speed, lv_color_hex(0xc42727), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_label_Speed, &my_front, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_label_Speed, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_letter_space(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_line_space(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->screen_label_Speed, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_label_Speed, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes screen_label_Mode
    ui->screen_label_Mode = lv_label_create(ui->screen);
    lv_label_set_text(ui->screen_label_Mode, "尺寸");
    lv_label_set_long_mode(ui->screen_label_Mode, LV_LABEL_LONG_WRAP);
    lv_obj_set_pos(ui->screen_label_Mode, 12, 248);
    lv_obj_set_size(ui->screen_label_Mode, 114, 37);

    //Write style for screen_label_Mode, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_border_width(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->screen_label_Mode, lv_color_hex(0xc42727), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->screen_label_Mode, &my_front, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->screen_label_Mode, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_letter_space(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_line_space(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->screen_label_Mode, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->screen_label_Mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //The custom code of screen.


    //Update current screen layout.
    lv_obj_update_layout(ui->screen);

    //Init events for screen.
    events_init_screen(ui);
}
